package dev.ece.core.controller.commands;

import dev.ece.core.controller.Command;
import dev.ece.core.engine.Engine;
import dev.ece.util.tools.Camera;

public class CameraDown extends Command {

	private Camera camera;
	
	private float speed;
	
	public CameraDown(Camera camera, float speed) {
		this.camera = camera;
		this.speed = speed;
	}
	
	@Override
	public void onExecute() {
		float distance = Engine.currentTimer().getDalyTime() * this.speed;
		this.camera.down(distance);
	}
	
	@Override
	public void onKeyPress() {
		
	}

	@Override
	public void onKeyRelease() {
		
	}

	public float getSpeed() {
		return speed;
	}
	
	public void setSpeed(float speed) {
		this.speed = speed;
	}
	
	public Camera getCamera() {
		return camera;
	}

}
